<div class="page-single">
  <div class="container">
    <ng-container *ngIf="!bindSuccess else success">
      <form #f="ngForm" (ngSubmit)="onSubmit()">
        <div class="weui-cells__title">绑定你的支付宝</div>
        <div class="weui-cells weui-cells_form">
          <div class="weui-cell">
            <div class="weui-cell__hd">
              <label class="weui-label">支付宝:</label>
            </div>
            <div class="weui-cell__bd">
              <input class="weui-input" type="text" placeholder="绑定手机号"
                     [(ngModel)]="bindAli.alipay" name="alipay"
                     weui-input="mobile" weui-required/>
            </div>
          </div>
          <div class="weui-cell">
            <div class="weui-cell__hd">
              <label class="weui-label">真实名:</label></div>
            <div class="weui-cell__bd">
              <input class="weui-input" type="text" placeholder="实名认证的名字"
                     [(ngModel)]="bindAli.aliname" name="aliname"  weui-input="text" weui-required  weui-cleaner/>
            </div>
          </div>
        </div>
        <div class="weui-btn-area">
          <button class="weui-btn weui-btn_primary" weui-button [weui-loading]="loading"
                  [disabled]="!f.form.valid || !f.form.dirty"
                  [ngClass]="{'weui-btn_disabled': !f.form.valid || !f.form.dirty}">确&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;认
          </button>
        </div>
        <div class="weui-cells__tips">
          <p class="text-danger">🔈:绑定支付宝后无法修改,请仔细核对支付宝信息后提交.</p>
          <p class="font-weight-bold text-primary">申请提现成功后,审核(1-2个工作日)成功后将转账到这个支付宝.我们不会泄露你的信息给第三方.</p>
        </div>
      </form>
    </ng-container>
  </div>
</div>
<ng-template #success>
  <div class="weui-msg">
    <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
    <div class="weui-msg__text-area">
      <h2 class="weui-msg__title">操作成功</h2>
      <p class="weui-msg__desc">绑定支付宝成功,提现会转账到支付宝{{bindAli.alipay}}</p>
    </div>
    <div class="weui-msg__opr-area">
      <p class="weui-btn-area">
        <a routerLink="/" class="weui-btn weui-btn_primary">返回首页</a>
      </p>
    </div>
  </div>
</ng-template>
